package cn.sxgan.gen.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Description: 通用Api接口异常信息
 * @Author: sxgan
 * @Date: 2024-10-24 13:56
 * @Version: 1.0
 **/
@Data
@EqualsAndHashCode(callSuper = true)
public class ApiException extends RuntimeException {
    private Integer code;// 状态码
    private String msg;// 异常信息
    
    public ApiException(String msg) {
        super(msg);
        this.msg = msg;
    }
    
    public ApiException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}